<template>
	<view class="page" :style="{'min-height':h+'px'}">
		<c-nav-bar :title="titleHeader" ></c-nav-bar>
		<view class="title">停车开票</view>
		<view v-for="(item,index) in list" :key="index" class="item" @tap="toDetails(item)">
			<view class="i_left">
				<view class="il_info">
					<view>{{item.from}}-{{item.park}}</view>
					<view class="ili_licence">{{item.name}}</view>
					<view class="ili_date">{{item.date}}</view>
				</view>
			</view>
			<view class="i_right">
				<text>￥{{item.price}}</text>
				<view class="ir_status">{{item.status==1?'开票中':'已完成'}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				titleHeader:'开票记录',
				h: uni.getSystemInfoSync().windowHeight,
				list:[
					{
						id:1,
						from:'沈家湾',
						park:'P2停车场',
						name:'文忠成',
						date:'2023-09-15',
						price:'52.00',
						status:1
					}
				]
			}
		},
		methods: {
			toDetails(item){
				uni.navigateTo({
					url:'/pagesIndex/parkingService/invoiceDetails?id='+item.id
				})
			}
		}
	}
</script>

<style scoped lang="less">
	.page{
		padding: 45rpx 24rpx;
		background: #F5F8FA;
		padding-top: 130rpx;
		.title{
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #333333;
		}
		.item{
			background: #FFFFFF;
			border-radius: 20rpx;
			margin-top: 20rpx;
			padding: 26rpx 24rpx 20rpx 30rpx;
			box-sizing: border-box;
			display: flex;
			justify-content: space-between;
			
			.i_left{
				.il_info{
					&>view{
						font-size: 32rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #333333;
						&.ili_licence{
							margin-top: 4rpx;
						}
						&.ili_date{
							font-size: 28rpx;
							color: #999999;
							margin-top: 20rpx;
						}
					}
				}
			}
			.i_right{
				display: flex;
				flex-direction: column;
				flex-wrap: wrap-reverse;
				text{
					font-size: 32rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #FE401A;
				}
				.ir_status{
					margin-top: 11rpx;
					width: 95rpx;
					height: 37rpx;
					background: rgba(13, 191, 253, .06);
					line-height: 37rpx;
					text-align: center;
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #007A69;
				}
			}
		}
	}
</style>